
#!/bin/sh
docker stop wt-plg-bin-p
PIDST=$!
wait $PIDST

docker rm wt-plg-bin-p
PIDA=$!
wait $PIDA

docker rmi wt-plg-bin:1.52.63  
PIDS=$!
wait $PIDS


docker build -t wt-plg-bin:1.52.63 -f Dockerfile . 

PID=$!

wait $PID

STATUS=$?

echo "命令的退出状态: $STATUS"
if [ $STATUS -eq 0 ]; then 
    echo "命令执行成功"
    docker run --name wt-plg-bin-p -p 3333:3000 -it --rm -d wt-plg-bin:1.52.63 

    # 获取容器的退出状态
else
    echo "命令执行失败"

fi
